package com.msz.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * @author hx
 * @since 2021/12/2 10:34 下午
 */

//@ResponseStatus(value = HttpStatus.METHOD_NOT_ALLOWED, reason = "接口请求方式错误")
public class HttpException extends RuntimeException{
    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public HttpException() {
    }

    public HttpException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

}
